package com.feifan;

import com.feifan.pojo.UserDTO;
import com.feifan.service.api.UserOperatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Donald
 * @create 2019-04-18 0:17
 */
@Controller
public class controller {
    @Autowired
    private UserOperatorService userOperatorService;

    @RequestMapping("gett")
    @ResponseBody
    public UserDTO find()
    {
        UserDTO userDTO = null;
        try {
            userDTO = userOperatorService.findAllRolesByUserId(2L);
        }catch (Exception e)
        {
            System.err.println("failed");
        }
        return userDTO;
    }
}
